A strongly-typed sequence of 1 variously typed values.
- T
- The first value type.
A Tuple is an immutable, strongly typed sequence of variously typed values with each value lacking an otherwise meaningful name aside from its position.
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
See Also: Inherited members from object.
⊟ Public Constructors
Tuple (T)Constructs and initializes a new Cadenza.Tuple<T> instance. ⊟ Public Properties
[read-only] Item1 T . The first tuple value. ⊟ Public Methods
⊟ Extension Methods
staticAggregate<T,TResult> (this Tuple<T>, Func<T, TResult>) : TResult Converts the Cadenza.Tuple<T> into a TResult. staticJust<T> (this T) : Maybe<T> Create a new Cadenza.Maybe<T> instance initialized to a specified value. The returned value will not be Maybe<T>.Nothing. staticMatch<T,TResult> (this Tuple<T>, params Func<T, Maybe<TResult>>[]) : TResult Converts the current Cadenza.Tuple<T> instance into a TResult. staticMatch<TSource,TResult> (this TSource, params Func<TSource, Maybe<TResult>>[]) : TResult Converts the TSource instance self into a TResult. staticToEnumerable<T> (this Tuple<T>) : IEnumerable<object> Converts the Cadenza.Tuple<T> into a IEnumerable<object>. staticToMaybe<T> (this T) : Maybe<T> Create a new Cadenza.Maybe<T> instance initialized to a specified value. The returned value may be Maybe<T>.Nothing. staticTraverseBreadthFirst<TSource,TResult> (this TSource, Func<TSource, TResult>, Func<TSource, IEnumerable<TSource>>) : IEnumerable<TResult> Traverse a tree in a breadth-first fashion, converting each encountered node. staticTraverseBreadthFirstWithParent<TSource,TResult> (this TSource, Func<TSource, TResult>, Func<TSource, IEnumerable<TSource>>) : IEnumerable<KeyValuePair<TSource, TResult>> Traverse a tree in a breadth-first fashion, converting each encountered node. staticTraverseDepthFirst<TSource,TResult> (this TSource, Func<TSource, TResult>, Func<TSource, IEnumerable<TSource>>) : IEnumerable<TResult> Traverse a tree in a depth-first fashion, converting each encountered node. staticTraverseDepthFirstWithParent<TSource,TResult> (this TSource, Func<TSource, TResult>, Func<TSource, IEnumerable<TSource>>) : IEnumerable<KeyValuePair<TSource, TResult>> Traverse a tree in a depth-first fashion, converting each encountered node. staticWith<TSource,TResult> (this TSource, Func<TSource, TResult>) : TResult Supports chaining otherwise temporary values.
⊟ Tuple Constructor
Constructs and initializes a new Cadenza.Tuple<T> instance.
public Tuple (T item1)⊟ Parameters
- item1
- A T which is used to initialize the Tuple<T>.Item1 property.
⊟ Remarks
Constructs and initializes a new Cadenza.Tuple<T> instance.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Equals Method
Determines whether the current instance and the specified object have the same value.
⊟ Parameters
- obj
- A object to compare this instance against.
⊟ Returns
true if obj is a Cadenza.Tuple<T> and each member of obj and the current instance have the same value (according to EqualityComparer<T>.Equals(`0, `0)); otherwise false is returned.⊟ Remarks
This method checks for value equality (EqualityComparer<T>.Equals(`0, `0)), as defined by each value type.
Note: This method overrides object.Equals(object).⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ GetHashCode Method
Generates a hash code for the current instance.
public override int GetHashCode ()⊟ Returns
A int containing the hash code for this instance.⊟ Remarks
Note: This method overrides object.GetHashCode.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Item1 Property
The first tuple value.
public T Item1 { get; }⊟ Value
A T which is the first tuple value.⊟ Remarks
The first tuple value.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ ToString Method
Returns a string representation of the value of the current instance.
public override string ToString ()⊟ Returns
A string representation of the value of the current instance.⊟ Remarks
Operation
Returns (, followed by a comma-separated list of the result of calling object.ToString on Tuple<T>.Item1, followed by ).⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0